@use "sass:color";
@use "../variables.scss";

body,
html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

body {
  font-family: "Helvetica Neue", "Helvetica", sans-serif;
  font-weight: 400;
  color: variables.$text-color-body-copy;
  display: flex;
  flex-direction: column;
  flex: 1;
  -webkit-font-smoothing: antialiased;
  overflow: auto;
}

body a {
  text-decoration: none;
  outline: none;
  cursor: pointer;
  font-weight: 500;
  color: var(--link-color);
  &:hover {
    color: var(--link-hover-color);
  }
}

:target:before {
  content: "";
  display: block;
  height: 100px;
  margin: -100px 0 0;
}

#app {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.link {
  color: var(--link-color);
  cursor: pointer;
  font-weight: 500;
  position: relative;

  &.has-arrow {
    position: relative;

    &::after {
      content: "";
      display: inline-block;
      position: absolute;
      // width: 12px;
      // height: 7px;
      // background-image: url("@src/images/main_spritesheet.svg");
      // background-repeat: no-repeat;
      // background-size: initial;
      // background-position: -275px -85px;
      top: 4px;
      right: -15px;
      transform: rotate(90deg);
      transition: ease-in-out 0.2s;
    }
  }

  &:hover {
    text-decoration: underline;
    color: var(--link-hover-color);

    &.has-arrow::after {
      right: -18px;
    }
  }
}
.link > .has-arrow {
  position: relative;
  &::after {
    content: "";
    display: inline-block;
    position: absolute;
    // width: 12px;
    // height: 7px;
    // background-image: url("@src/images/main_spritesheet.svg");
    // background-repeat: no-repeat;
    // background-size: initial;
    // background-position: -275px -85px;
    top: 4px;
    right: -15px;
    transform: rotate(90deg);
    transition: ease-in-out 0.2s;
  }
  &:hover {
    text-decoration: underline;

    &.has-arrow::after {
      right: -18px;
    }
  }
}

.DiffSummary {
  font-size: 12px;

  .files {
    color: #9b9b9b;
  }

  .lines-added {
    color: #44bb66;
  }

  .lines-removed {
    color: #bc4752;
  }
}

.Loader {
  path {
    fill: var(--primary-color);
  }
  &.warning path {
    fill: variables.$warning-color;
  }
  &.error path {
    fill: variables.$error-color;
  }
}

.snapshotOptions {
  display: flex;
  margin-top: 10px;
  border: 1px solid #4a4a4a;
  border-radius: 3px;
  padding: 8px 10px;
  cursor: pointer;
  margin-right: 10px;
  color: #000000 !important;
  align-items: center;
  width: 170px;
  font-weight: 500;
  font-size: 14px;
  line-height: 14px;

  &:hover {
    background-color: variables.$primary-light-color;
  }
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 100%;
  margin-right: 6px;
  display: inline-block;
  position: relative;
}

.status-tag {
  border-radius: 2px;
  padding: 2px 4px;
  font-size: 12px;
  line-height: 12px;
  font-weight: 500;
  white-space: nowrap;

  // app resource state status colors //
  &.missing {
    color: #f65c5c;
    background-color: #ffd1c7;
  }
  &.unavailable {
    color: #ec8f39;
    background-color: #fbe9d7;
  }
  &.degraded {
    color: #ebb55c;
    background-color: #fcf5dd;
  }
  &.updating {
    color: #ebb55c;
    background-color: #fcf5dd;
  }
  &.ready {
    color: #44bb66;
    background-color: #ecf8f0;
  }
  // version status colors //
  &.success {
    background-color: var(--success-color);
    color: #ffffff;
  }
  &.failed {
    background-color: var(--error-color);
    color: #ffffff;
  }
  &.skipped {
    background-color: variables.$light-accent;
    color: variables.$text-color-header;
  }
  &.unknown {
    background-color: variables.$muted-light-accent;
    color: #ffffff;
  }
  &.required {
    background-color: var(--warning-color);
    color: #ffffff;
  }
}

.status-indicator {
  font-size: 12px;
  line-height: 12px;
  font-weight: 500;
  color: #afafaf;
  position: relative;
  padding-left: 12px;

  &::before {
    position: absolute;
    content: "";
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 100%;
    margin-right: 4px;
    top: 4px;
    left: 0;
  }

  &.completed::before {
    background-color: #44bb66;
  }
  &.failed::before {
    background-color: #bc4752;
  }
  &.inprogress::before {
    background-color: #326de6;
  }
  &.reclaimed::before {
    background-color: #4999ad;
  }
  &.failedvalidation::before {
    background-color: #bc4752;
  }
  &.partiallyfailed::before {
    background-color: #bc4752;
  }
  &.deleting::before {
    background-color: #f7b500;
  }
  &.enabled::before {
    background-color: #44bb66;
  }
  &.disabled::before {
    background-color: #c4c7ca;
  }
}

code {
  padding: 2px 4px;
  font-size: 90%;
  color: #326de6;
  font-family: "Monaco", "Helvetica Neue", "Helvetica", sans-serif;
  background-color: #e3f5e8;
  border-radius: 4px;
}

.inline-code {
  font-size: 10px;
  font-family: "Monaco", "Helvetica Neue", "Helvetica", sans-serif;
  border-radius: 2px;
  background-color: #e5eaec;
  color: #073551;
  padding: 1px 3px;

  &.no-bg {
    background-color: transparent;
    padding: 0;
  }
}

.container {
  padding: 0 20px;
  padding-top: 20px;
}

.centered-container {
  max-width: 964px;
  margin: 0 auto;
  width: 100%;
}

.HiddenText-wrapper {
  top: -1000px;
  left: -1000px;
  z-index: -1;
  opacity: 0;
}

.init-pre-wrapper {
  max-width: 510px;
  width: 100%;
}
.init-unfork-wrapper {
  max-width: 825px;
  width: 100%;
  .Input {
    height: 40px;

    .is-disabled {
      user-select: none;
      cursor: not-allowed;
      background-color: #f8f8f8;
      border-color: #dfdfdf;
      color: #717171;
    }
  }
}
.unfork-callout {
  max-width: 218px;
  min-width: 218px;
  -webkit-box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.16);
  -moz-box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.16);
  box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.16);
  background-color: #ffffff;
  border-radius: 4px;
  padding: 14px;
  margin-right: 20px;
}

.unforkLink {
  .arrow {
    top: 2px;
    left: 3px;
  }
  &:hover .arrow {
    left: 5px;
  }
}

.PreflightMessageRow {
  h2 {
    font-size: 16px;
    font-weight: 700;
  }
  p {
    font-size: 12px;
    font-weight: 500;
    color: #9b9b9b;
  }
  ul {
    display: block;
  }
}

.arrow_box {
  padding: 10px;
}

.error-block-wrapper {
  background-color: color.adjust(variables.$error-color, $lightness: 43.5%);
  border-radius: 4px;
  padding: 15px;
  margin: 0 auto;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
}

.errors {
  display: inline-block;
  color: #ffffff;
  text-align: center;
  font-weight: bold;
  font-size: 10px;
  line-height: 10px;
  border-radius: 50%;
  width: 8px;
  height: 8px;
  padding: 3px 6px 6px 5px;
  background: variables.$error-color;
}
.warnings {
  display: inline-block;
  color: #ffffff;
  text-align: center;
  font-weight: bold;
  font-size: 10px;
  line-height: 10px;
  border-radius: 50%;
  width: 8px;
  height: 8px;
  padding: 3px 6px 6px 5px;
  background: variables.$warning-color;
}

.circleNumberGray {
  display: inline-block;
  color: #ffffff;
  text-align: center;
  font-weight: bold;
  font-size: 12px;
  line-height: 12px;
  border-radius: 50%;
  width: 7px;
  height: 11px;
  padding: 3px 6px 4px 6px;
  background: #9b9b9b;
}

.__react_component_tooltip {
  font-size: 12px;
  line-height: 20px;
  font-weight: 500;
  max-width: 300px;
  text-align: center;
}

/*
Apply this class to any icon using main_spritesheet. From there
all you need to do is supply a `width: [value]` `height: [value]`
and `background-position: [value]`
*/
.icon {
  background-image: url("@src/images/main_spritesheet.svg");
  background-repeat: no-repeat;
  background-size: initial;
  display: inline-block;
  cursor: default;
  position: relative;
}
.icon.clickable {
  cursor: pointer;
}

.required-label {
  background-color: color.adjust(variables.$warning-color, $lightness: 43.5%);
  border-radius: 2px;
  color: variables.$warning-color;
  font-size: 10px;
  line-height: 10px;
  font-weight: 500;
  padding: 2px 4px 3px 4px;
  margin-left: 8px;
}

.edit-files-banner {
  background-color: variables.$primary-light-color;
  color: color.adjust(variables.$primary-color, $lightness: 15%);
  border-bottom: 1px solid color.adjust(variables.$primary-color, $lightness: 15%);
  padding: 13px 20px 12px;
  width: 100%;
  left: 0;
  right: 0;
  top: 0;
  text-align: center;

  &.gitops-enabled-banner {
    background-color: #e9e5ef;
    border-bottom-color: #cac1d8;
    padding: 10px 20px 9px;
  }
}

/* Media Queries */

/* ≥ 568px */
@media screen and (min-width: 35.5em) {
}

/* ≥ 768px */
@media screen and (min-width: 48em) {
  .container {
    padding: 0 30px;
  }
}

/* ≥ 960px */
@media screen and (min-width: 60em) {
}

/* ≥ 1024px */
@media screen and (min-width: 64em) {
}

/* ≥ 1280px */
@media screen and (min-width: 80em) {
}

.hidden {
  display: none;
}

.paddingContainer {
  padding: 0 20px;
}

/// NEW CSS CLASSES
.card-bg {
  background: var(--card-color);
  border-radius: 6px;
  padding: 15px;
}
.card-title {
  font-size: 16px;
  font-weight: 700;
  color: variables.$text-color-primary;
}
.card-item {
  padding: 8px;
  border-radius: 6px;
  background-color: #ffffff;
}

.card-item-title {
  font-size: 16px;
  font-weight: 700;
  color: variables.$text-color-primary;
  line-height: 1.7;
}

@mixin keyframes($animation-name) {
  @-webkit-keyframes #{$animation-name} {
    @content;
  }
  @keyframes #{$animation-name} {
    @content;
  }
}

@mixin animation($str) {
  -webkit-animation: #{$str};
  animation: #{$str};
}

@include keyframes(fadein) {
  from {
    bottom: 0;
    opacity: 0;
  }
  to {
    bottom: 10px;
    opacity: 1;
  }
}

@include keyframes(fadeout) {
  from {
    bottom: 10px;
    opacity: 1;
  }
  to {
    bottom: 0;
    opacity: 0;
  }
}

.toast {
  visibility: hidden;
  bottom: 3px;
}

.toast.visible {
  visibility: visible;
  @include animation("fadein 0.5s, fadeout 0.5s 7s");
}
